import { stringify } from 'qs';
import request from '../utils/request';
import API from './ipConfig'

/**
 *获取充值列表
 *
 */
export async function RechargeList() {
  return request(`${API}/sys/rechargeManage/findRechargeList`,{
    method: 'GET',
  });
}

/**
 *获取充值列表--分页
 *
 */
export async function RechargeListPage(params) {
  return request(`${API}/sys/rechargeManage/findRechargeList?index=${params.index}`,{
    method: 'GET',
  });
}

/**
 *获取充值列表--搜索
 *
 */
export async function RechargeListSearch(params) {
  return request(`${API}/sys/rechargeManage/findRechargeList?consumerName=${params.consumerName}&beginTime=${params.beginTime}&endTime=${params.endTime}&index=${params.index}`,{
    method: 'GET',
  });
}


/**
 * 修改充值配置
 *
 * @export
 * @returns
 */
export async function updateRechargeConfig(params) {
  return request(`${API}/sys/eventManage/updateRechargeConfig`,{
    method: 'POST',
    body: params,

  });
}


/**
 *获取充值列表search时--分页
 *
 */
export async function RechargeListPageSearch(params) {
  return request(`${API}/sys/rechargeManage/findRechargeList?consumerName=${params.consumerName}&beginTime=${params.beginTime}&endTime=${params.endTime}&index=${params.index}`,{
    method: 'GET',
  });
}

